const express = require("express");

const app = express();

app.use(express.json());

app.get("/users", (req, res) => {
  res.send({ name: "jack", age: 20 });
});

app.get("/info", (req, res) => {
  const info = {
    name: "jack",
    age: 20,
    gender: "boy",
  };
  res.send(`const data = ${JSON.stringify(info)};`);
});

app.listen(8080, () => {
  console.log("http://127.0.0.1:8080");
});
